ul.nav.navbar-nav.navbar-right(ng-show="config.auth.name != 'NoAuth'")
    li.dropdown(ng-show="anonymous", ng-class="loginCollapsed ? '':'open'")
        a(ng-click="loginCollapsed = !loginCollapsed")
            | Anonymous
            b.caret
        ul.dropdown-menu(uib-dropdown-menu)
            li
                a(href="auth/login?redirect={{redirect}}")
                    span(ng-hide="config.auth.oauth2")
                        i.fa.fa-sign-in
                        | &nbsp;Login
                    span(ng-show="config.auth.oauth2")
                       i.fa(ng-class="config.auth.fa_icon")
                       | &nbsp;Login with {{config.auth.name}}

    li.dropdown(uib-dropdown, ng-hide="anonymous")
        a.dropdown-toggle(uib-dropdown-toggle)
            .avatar(ng-if="email")
                img(ng-src="avatar?email={{email}}")
            span(ng-if="!email")
                | {{full_name || username}}
                b.caret
        ul.dropdown-menu(uib-dropdown-menu)
            li.dropdown-header(ng-if="full_name || email")
                i.fa.fa-user
                span {{ full_name }} {{ email }}
            li.divider
            li
                a(href="auth/logout?redirect={{redirect}}")
                   i.fa.fa-sign-out
                   | Logout
